(function(){Type.registerNamespace("Telerik.Web.UI");
var a=Telerik.Web.UI;
a.RadDataPager=function(c){var b=["dataPagerCreating","dataPagerCreated","dataPagerDestroying","pageIndexChanging","pageSizeChanging"];
this._initializeEvents(b);
a.RadDataPager.initializeBase(this,[c]);
this._startRowIndex=0;
this._pageSize=10;
this._totalRowCount=-1;
this._currentPageIndex=1;
this._pageCount=1;
this._uniqueID=null;
this._postBackFunction="__doPostBack('{0}','{1}')";
parseInteger=function(d){if(typeof(d)=="number"){return d;
}else{if(typeof(d)=="string"){return parseInt(d,10);
}}};
};
a.RadDataPager._executePostBackEvent=function(){var b=Array.prototype.slice.call(arguments);
this._postBackFunction=this._postBackFunction.replace("{0}",this.get_uniqueID());
this._postBackFunction=this._postBackFunction.replace("{1}",b);
eval(this._postBackFunction);
};
a.RadDataPager.prototype={initialize:function(){a.RadDataPager.callBaseMethod(this,"initialize");
this.raise_dataPagerCreating(new Sys.EventArgs());
this.raise_dataPagerCreated(new Sys.EventArgs());
},dispose:function(){this.raise_dataPagerDestroying(new Sys.EventArgs());
$clearHandlers(this.get_element());
a.RadDataPager.callBaseMethod(this,"dispose");
},get_uniqueID:function(){return this._uniqueID;
},get_pageCount:function(){return this._pageCount;
},get_startRowIndex:function(){return this._startRowIndex;
},get_pageSize:function(){return this._pageSize;
},get_totalRowCount:function(){return this._totalRowCount;
},get_currentPageIndex:function(){return this._currentPageIndex;
},set_currentPageIndex:function(b){var c=new a.DataPagerPageIndexChangingEventArgs(this._currentPageIndex,b);
this.raise_pageIndexChanging(c);
if(c.get_cancel()){return;
}var d=parseInteger(c.get_newPageIndex());
if(isNaN(d)||(this._currentPageIndex==d)){return;
}this._currentPageIndex=d;
this.fireCommand("Page",this._currentPageIndex);
},set_pageSize:function(b){var c=new a.DataPagerPageSizeChangingEventArgs(this._pageSize,b);
this.raise_pageSizeChanging(c);
if(c.get_cancel()){return;
}var d=parseInteger(c.get_newPageSize());
if(isNaN(d)||(this._pageSize==d)){return;
}this._pageSize=d;
this.fireCommand("PageSizeChange",this._pageSize);
},fireCommand:function(b,c){a.RadDataPager._executePostBackEvent.call(this,this._constructPostBackData(b,c));
},_constructPostBackData:function(b,c){return String.format("FireCommand:{0}|;{1}|;",b,c);
},_initializeEvents:function(d){if(d){var b=this;
for(var e=0,f=d.length;
e<f;
e++){var c=d[e];
this["add_"+c]=function(g){return function(h){this.get_events().addHandler(g,h);
};
}(c);
this["remove_"+c]=function(g){return function(h){this.get_events().removeHandler(g,h);
};
}(c);
this["raise_"+c]=function(g){return function(h){this.raiseEvent(g,h);
};
}(c);
}}}};
a.RadDataPager.registerClass("Telerik.Web.UI.RadDataPager",a.RadWebControl);
a.DataPagerPageIndexChangingEventArgs=function(c,b){a.DataPagerPageIndexChangingEventArgs.initializeBase(this);
this._newPageIndex=b;
this._oldPageIndex=c;
};
a.DataPagerPageIndexChangingEventArgs.prototype={get_oldPageIndex:function(){return this._oldPageIndex;
},get_newPageIndex:function(){return this._newPageIndex;
},set_newPageIndex:function(b){this._newPageIndex=b;
}};
a.DataPagerPageIndexChangingEventArgs.registerClass("Telerik.Web.UI.DataPagerPageIndexChangingEventArgs",Sys.CancelEventArgs);
a.DataPagerPageSizeChangingEventArgs=function(b,c){a.DataPagerPageSizeChangingEventArgs.initializeBase(this);
this._newPageSize=c;
this._oldPageSize=b;
};
a.DataPagerPageSizeChangingEventArgs.prototype={get_oldPageSize:function(){return this._oldPageSize;
},get_newPageSize:function(){return this._newPageSize;
},set_newPageSize:function(b){this._newPageSize=b;
}};
a.DataPagerPageSizeChangingEventArgs.registerClass("Telerik.Web.UI.DataPagerPageSizeChangingEventArgs",Sys.CancelEventArgs);
})();
